package com.designpatterns.observerpattern;

public class TestObserverPattern {
    public static void main(String[] args) {
        ObservableProductList observable = ObservableProductList.getTheProductList();
        TaoBaoObserver taoBaoObserver = new TaoBaoObserver();
        JingDongObserver jingDongObserver = new JingDongObserver();
        observable.addProductListObserver(taoBaoObserver);
        observable.addProductListObserver(jingDongObserver);
        observable.addProduct("新产品1");
        observable.addProduct("新产品2");
    }
}
